package demo.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import config.CustomConfig;



public class BFLog {
	
	public static final int INFO 	= 0;
	public static final int NOTICE	= 1;
	public static final int WARN 	= 2;
	public static final int ERROR 	= 3;
	public static final int NO_LOG 	= -1;
	
	public static final int currentLevel = INFO;
	
	private static SimpleDateFormat dmy = new SimpleDateFormat("dd/MM/yy HH:mm:ss:SSS"); 
	
	public static void log(String message, int level){
		//long currentDay = new Date().getTime();
		String time = dmy.format(new Date());

		if ( level>=currentLevel && currentLevel!=NO_LOG){
			Display.println(time+" ----- "+message);			
		}	
	}
	
	public static void error(String message){	log(message,ERROR);}
	public static void info(String message){	log(message,INFO);}
	public static void notice(String message){	log(message,NOTICE);}
	public static void warn(String message){	log(message,WARN);}
	
	

}
